package date

import (
	"fmt"
	"time"
)

type Datetime time.Time

func (this Datetime) String() {
	t := time.Time(this)
	fmt.Println(t.Format("2006-01-02 15:04:05"))
}

type Date time.Time

func (this Date) String() {
	t := time.Time(this)
	fmt.Println(t.Format("2006-01-02"))
}

type Time time.Time

func (this Time) String() {
	t := time.Time(this)
	fmt.Println(t.Format("15:04:05"))
}

type TestData struct {
	Datetime Datetime
	Date     Date
	Time     Time
}

func test() {
	var t = &TestData{
		Datetime(time.Now()),
		Date(time.Now()),
		Time(time.Now()),
	}
	t.Datetime.String()
	t.Date.String()
	t.Time.String()
}
